-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(rds): S3 import and export for DatabaseInstances #10370
Conversation
This change introduces S3 import/export for DatabaseInstances, the same as what currently exists today for DatabaseClusters. This change was heavily influenced by #10132 (the work to introduce feature names for DatabaseCluster), and steals patterns and names heavily from it. **Implementation Notes:** * Unlike for clsuters, for instances, the feature names are required; if the feature name doesn't exist, we shouldn't be creating the role. * For both Oracle and SQL Server, all current/active versions support the same feature names. This simplified the implementation quite a bit. * I opted **not** to support features for the deprecated Oracle versions. * I moved the `setupS3ImportExport` helper function into a utils class. One quirk of the SQL Server requirement is that you must create an OptionGroup with only one role (for both import & export). Oracle, likewise, has a single feature for both import and export. So I opted to default to creating a single role (if necessary) for both import and export. Open to challenges on this. * The `OptionGroup` class needed some rework to be able to make the list of configurations dynamic. I then had to do some light tweaking to ensure backwards compatibility with the connections property. fixes #4419
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic work! I have some comments, they're really in the details though, the general direction is awesome.
Co-authored-by: Adam Ruka <adamruka@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love (almost) everything about this. The only thing that I'm not a huge fan of is adding the description
property to IInstanceEngine
- I feel like a utility function might be better, especially that we use description
only in a single spot (unless I missed something) in the entire codebase, and it can be considered backwards-incompatible.
I'll leave it to your judgement though 🙂.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
As mentioned in #14546, Postgres database instances did not support `s3export` when most of the `s3 import/export` features were added in #10370. This PR fills in that gap now that `s3export` is [available](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/postgresql-s3-export.html) for Postgres. The supported versions are documented [here](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/postgresql-s3-export.html) and I manually verified via AWS CLI that Postgres 13+ supports `s3export` as well. Looking into the test suite, I think it makes more sense to modify the existing test than to create an entirely new one, similar to how other database instances test s3 import/export at the same time. But I can also move it to its own test if necessary. I also fixed a very minor doc typo in `cluster-instance.ts`. Closes #14546. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
) As mentioned in aws#14546, Postgres database instances did not support `s3export` when most of the `s3 import/export` features were added in aws#10370. This PR fills in that gap now that `s3export` is [available](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/postgresql-s3-export.html) for Postgres. The supported versions are documented [here](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/postgresql-s3-export.html) and I manually verified via AWS CLI that Postgres 13+ supports `s3export` as well. Looking into the test suite, I think it makes more sense to modify the existing test than to create an entirely new one, similar to how other database instances test s3 import/export at the same time. But I can also move it to its own test if necessary. I also fixed a very minor doc typo in `cluster-instance.ts`. Closes aws#14546. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
) As mentioned in aws#14546, Postgres database instances did not support `s3export` when most of the `s3 import/export` features were added in aws#10370. This PR fills in that gap now that `s3export` is [available](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/postgresql-s3-export.html) for Postgres. The supported versions are documented [here](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/postgresql-s3-export.html) and I manually verified via AWS CLI that Postgres 13+ supports `s3export` as well. Looking into the test suite, I think it makes more sense to modify the existing test than to create an entirely new one, similar to how other database instances test s3 import/export at the same time. But I can also move it to its own test if necessary. I also fixed a very minor doc typo in `cluster-instance.ts`. Closes aws#14546. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
) As mentioned in aws#14546, Postgres database instances did not support `s3export` when most of the `s3 import/export` features were added in aws#10370. This PR fills in that gap now that `s3export` is [available](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/postgresql-s3-export.html) for Postgres. The supported versions are documented [here](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/postgresql-s3-export.html) and I manually verified via AWS CLI that Postgres 13+ supports `s3export` as well. Looking into the test suite, I think it makes more sense to modify the existing test than to create an entirely new one, similar to how other database instances test s3 import/export at the same time. But I can also move it to its own test if necessary. I also fixed a very minor doc typo in `cluster-instance.ts`. Closes aws#14546. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This change introduces S3 import/export for DatabaseInstances, the same as what
currently exists today for DatabaseClusters. This change was heavily influenced
by #10132 (the work to introduce feature
names for DatabaseCluster), and steals patterns and names heavily from it.
Implementation Notes:
feature name doesn't exist, we shouldn't be creating the role.
feature names. This simplified the implementation quite a bit.
setupS3ImportExport
helper function into a utils class. Onequirk of the SQL Server requirement is that you must create an OptionGroup
with only one role (for both import & export). Oracle, likewise, has a single
feature for both import and export. So I opted to default to creating a single
role (if necessary) for both import and export. Open to challenges on this.
OptionGroup
class needed some rework to be able to make the list ofconfigurations dynamic. I then had to do some light tweaking to ensure
backwards compatibility with the connections property.
fixes #4419
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license